home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Cafe 3
/
Visual Cafe 3.ISO
/
Vcafe
/
Main.bin
/
TypeArchiver.java
< prev
next >
Wrap
Text File
|
1998-09-08
|
2KB
|
103 lines
package com.symantec.itools.tools.archive;
import java.util.Enumeration;
import com.symantec.itools.beans.EventBroadcaster;
/**
* @author Symantec Internet Tools Division
* @version 1.0
* @since VCafe 3.0
*/
public abstract class TypeArchiver
{
/**
* @since VCafe 3.0
*/
protected final boolean verbose;
/**
* @since VCafe 3.0
*/
protected EventBroadcaster eventBroadcaster;
/**
* @since VCafe 3.0
*/
protected Options options;
{
eventBroadcaster = new EventBroadcaster();
}
protected TypeArchiver(Options opts)
{
options = opts;
for(Enumeration e = opts.getListeners(); e.hasMoreElements();)
{
addArchiverListener((ArchiverListener)e.nextElement());
}
verbose = options.isVerbose();
}
/**
* @param listener TODO
* @since VCafe 3.0
*/
public synchronized void addArchiverListener(ArchiverListener listener)
{
eventBroadcaster.addListener(listener, true);
}
/**
* @param listener TODO
* @param all TODO
* @since VCafe 3.0
*/
public synchronized void removeArchiverListener(ArchiverListener listener, boolean all)
{
eventBroadcaster.removeListener(listener, false);
}
/**
* @param entry TODO
* @since VCafe 3.0
*/
protected void fireStartEntryAdd(String entry)
{
eventBroadcaster.fireEvent(new ArchiverEvent(this, entry), "startEntryAdd");
}
/**
* @param entry TODO
* @since VCafe 3.0
*/
protected void fireFinishEntryAdd(String entry)
{
eventBroadcaster.fireEvent(new ArchiverEvent(this, entry), "archiveCreated");
}
/**
* @param errorMsg TODO
* @since VCafe 3.0
*/
public abstract boolean create(StringBuffer errorMsg);
/**
* @since VCafe 3.0
*/
public abstract void cancel();
}